package org.jeecg.modules.waybill.job;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.waybill.service.IWlhyWaybillService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class WaybillExpireJobHandler {
    @Resource
    IWlhyWaybillService wlhyWaybillService;

    @XxlJob(value = "WaybillExpireJob")
    public ReturnT<String> waybillExpireJob(String params) {
        log.info("订单过期定时任务,执行..{}",params);
        wlhyWaybillService.expireJobHandler();
        log.info("订单过期定时任务,执行完毕");
        return ReturnT.SUCCESS;
    }
    @XxlJob(value = "testdemo")
    public ReturnT<String> testDemo(String params) {
        log.info("我是定时任务,我执行了...............................");
        return ReturnT.SUCCESS;
    }
}
